package com.liupengyuan.system.login.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.liupengyuan.system.user.model.User;
import com.liupengyuan.system.user.service.UserService;
@Service("loginService")
public class LoginServiceImpl  {
	@Autowired
	private UserService userService;
	
	public Boolean login(User user){
		User loginUser = userService.login(user);
		if(loginUser == null){
			return false;
		}
		if(user.getUsername().equals(loginUser.getUsername())){
			return true;
		}else{
			return false;
		}
	}
}
